<!DOCTYPE html>
<!-- saved from url=(0037)http://127.0.0.1/wx/ybss/zhuce/zc.jsp -->
<html class="pixel-ratio-1"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <title>登录</title>

  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no, email=no">
  <!--[if IE]>
  <script src="http://127.0.0.1:80/wx/ybss/js/html5shiv.min.js"></script>
  <![endif]-->

  <link href="resource/style.css" rel="stylesheet" type="text/css">


  <script src="resource/jquery214.js"></script>
  <script src="resource/fastclick.js"></script>
  <script src="resource/jqueryweui.js"></script>
  <script src="resource/zeptomin.js"></script>
  <script src="resource/picker.js"></script>
  <script src="../script/api.js"></script>
  <script src="../script/constants.js"></script>
  <script type="text/javascript" src="../script/aes.js"></script>
  <script type="text/javascript" charset="UTF-8" src="../script/naes.js"></script>
  <script type="text/javascript" src="../script/modeecb.js"></script>
  <script src="../script/tmd5.js"></script>
  <link rel="stylesheet" href="../resource/jinsuistyle.css" />
  <script>

    var timer = null;
    var countdown=300;

    window.apiready = function(){
      if (api.systemType=='ios') {
        var header = $api.byId('jsheader');
        $api.fixIos7Bar(header);
      }
      var dl_phone = $api.getStorage("dl_phone");
      $("#phone").val(dl_phone);
    }

    function settime(val) {
      if (countdown == 0) {
        val.removeAttribute("disabled");
        val.value="获取验证码";
        countdown = 300;
        $("#yzm").val("");
        window.clearTimeout(timer);
      } else {
        val.setAttribute("disabled", true);
        val.value="重新发送(" + countdown + ")";
        countdown--;
        timer = setTimeout(function() {
          settime(val);
        },1000);

      }

    }
  </script>

  <style>
 
	.space2{background: #878787;}
    .space{background: #104E8B;}
    .space1{background: #cccccc;}
    .logo-license{margin-top:0px;}
    .left{font-weight:bold;}
    .info {margin-top: 5rem;}
    .btn-1 a {
    width: 90%;
    outline: none;
    border: none;
    background: #18b4ed;
    color: #fff;
    height: 5rem;
    line-height: 5rem;
    display: inline-block;
    border-radius: 0.4rem;
    font-size: 2rem;
    }

    .weui_cells_form input, .weui_cells_form label[for], .weui_cells_form textarea {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    .weui_uploader_input {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    .weui_uploader_input_wrp {
    float: left;
    position: relative;
    margin-right: 9px;
    margin-bottom: 9px;
    width: 77px;
    height: 77px;
    border: 1px solid #d9d9d9;
    }
    .weui_uploader_files {
    list-style: none;
    }
    .weui_uploader_file {
    font-size: 12px;
    color: #333;
    text-align: center;
    display: table-cell;
    vertical-align: middle;
    display: table;
    }
    .weui_uploader_file {
    float: left;
    margin-right: 9px;
    margin-bottom: 9px;
    width: 79px;
    height: 79px;
    background: no-repeat 50%;
    background-size: cover;
    }

    .info ul li .weui_uploader_files{
    width:99px;
    height:99px;
    }
    .js_file1_show,.js_file2_show,.js_file3_show{display:none;}
    #ssk{background-color:#FFFFFF;width: 93%;height: 5rem;font-size:2rem;}
    /*地址样式*/
    #divselect .all li{line-height:2rem;padding:5px 1rem;text-indent:0;}
  </style>

</head>
<body style="background:url(../image/bj.png) repeat-x 0 80px;background-size:100%;">
<div style="height:600px;background:url(../image/mainbg.png) no-repeat right 0 bottom 0%;background-size:80%">
<!-- <header id="jsheader">
  <span style="text-align: center;width: 100%;margin: 0 auto;">注   册  信   息</span>
  <div style="clear:both"></div>
</header> -->
<!-- <div id="jsheader">
    <nav id="jsnav">
        <a id="jsleft" tapmode="" onclick="api.closeWin();">
            <span>返回</span>
        </a>
        <div id="jsmiddle">
            <strong id="jstitle">信息注册</strong>
        </div>
        <a id="jsright">
          <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
        </a>
    </nav>
</div> -->

<form id="form" method="post" enctype="multipart/form-data">
  <input name="md5_passwd" id="md5_passwd" type="hidden" />
  <input name="sm" id="sm" type="hidden" />
  <input name="type" id="type" type="hidden" value="1"/>
	<ul margin-top:0>
      <li class="hiSlider-item">
        <div id="fixiosstatusbardiv" style="display:none;height:10px;position:relative;top:0;left:0;right:0;background-color:#dfdfdf;"></div>
        <img id="banner1" src="../image/top.png" style="width: 100%;position:relative;">

      </li>

    </ul>
  <article class="info" style="margin-top:0">


    <ul>

      <li style="border:none">
	  <div class="left" onclick="api.closeWin();" style="font-size:20px;margin-bottom: 2px" ><font size="20px" color="#003399"> 返回上一页</div></br><br>
		<hr class="space2" style="height:2px;width:85%;margin-left:7.5%;margin-bottom:20px;border:none" />
        <div class="left">
          手机号:
        </div>
        <div class="right">
          <input id="phone" name="phone" readonly="ture" placeholder="请输入手机号" style="background-color:transparent">

        </div>
        <div class="clear"></div>
      </li>
	  <hr class="space1" style="height:2px;width:85%;margin-left:7.5%;margin-top:3px;border:none" />
      <li style="border:none">
        <div class="left">
          密码:
        </div>
        <div class="right">
          <input style="background-color:transparent" type="password" id="passwd" name="passwd" placeholder="请输入6位数字密码">
        </div>
        <div class="clear"></div>
      </li>
	  <hr class="space1" style="height:2px;width:85%;margin-left:7.5%;margin-top:3px;border:none" />
      <li style="border:none">
        <div class="left">
          确认密码:
        </div>
        <div class="right">
          <input style="background-color:transparent" type="password" id="passwd1" name="passwd1" placeholder="请输入6位数字密码">
        </div>
        <div class="clear"></div>
      </li>
	  <hr class="space1" style="height:2px;width:85%;margin-left:7.5%;margin-top:3px;border:none" />
     
    </ul>
  </article>
  <article class="btn-1">


	<a onclick="sz()"  id="wzc" style="width:40%;background:#104E8B;height:40px;font-size:15px;text-align:center;line-height:4rem;margin-top:8px;text-decoration:none">确认</a>
	<a id="yzc" style="width:40%;background:#104E8B;height:40px;font-size:15px;text-align:center;line-height:4rem;margin-top:8px;text-decoration:none;display: none">数据提交中...</a>

  </article>
</form>

<div>
				<img style="clear:both;height:50px;width:100%;position: absolute;bottom: 0;" src="../image/gh.png" />

		</div>
<script>
 function check0(){

   var passwd = document.getElementById("passwd").value;
   var passwd1 = document.getElementById("passwd1").value;
		if( passwd ==null||passwd=="" ){
	      alert("密码不能为空");
	       $("#wzc").show();
	       $("#yzc").hide();
	      return false;
	      
	    }
	    

	    if( passwd != passwd1 ){
	      alert("两次输入密码不同");
	       $("#wzc").show();
	       $("#yzc").hide();
	      return false;
	      
	    }
	    
	    if(!(/^\d{6}$/.test(passwd))){//验证手机号
      // alert("输入正确手机号");
		    alert("请输入6位数字密码");
		       $("#wzc").show();
		       $("#yzc").hide();
		      return false;
	       }
         return true;
        }

	function sz(){
	 var a = check0();
	 var passwd = document.getElementById("passwd").value;
     var passwd1 = document.getElementById("passwd1").value;
	 var passwd = md5(passwd);
	 var passwd1 = md5(passwd1);
	
	 if(a){
	 var salt = api.loadSecureValue({
	       sync: true,
	       key: 'salt'
	  });
	  passwd = md5(passwd+salt);
	  var phone = $api.getStorage("dl_phone");
	  var login = $api.getStorage("loginid");
	  var content = {"id":login,"zfwp":passwd,"phone":phone};
      var callback = function(ret, err){
            //console.log(JSON.stringify(ret));
            if(ret){
			if(ret.flag=="Y"){
			 $api.setStorage("payPwd",1);
			 api.sendEvent({
	             name:'reloadUIedit'
             });
             api.closeWin();
			}else{
			  api.alert({msg:'设置失败'});
	       		 	$("#yzc").hide();
	                $("#wzc").show();
			}
		  }
      }
      encApiAjax(JSON.stringify(content),url.setpaypwd,callback);
	 }
	}

</script>


</body></html>
